﻿using System;
using visinia.SmartEngine;
using visinia.SmartEngine.Modules;

namespace visinia.web.admin.pages
{
    public partial class ModuleInplaceRenderingPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["ModuleId"] == null)
                return;
            int ModuleId = 0;
            Int32.TryParse(Request.QueryString["ModuleId"], out ModuleId);
            ModuleInfo module = ModuleController.GetModule(ModuleId);
            WebModule webmodule = (WebModule)LoadControl(WebRoots.GetModulesRoot + module.ModuleUrl);
            webmodule.ModuleId = module.ModuleId;
            Controls.Add(webmodule);
        }
    }
}
